package org.blogwu.learn.designpattern.chapter28;

import java.util.ArrayList;
import java.util.List;

public class TestFilterPattern {

    public static void main(String[] args) {
        //创建测试集合并填入数据
        List<Users> usersList = new ArrayList<>();
        usersList.add(new Users(1,"senfel",25,Users.WORK_TYPE_ONE,null));
        usersList.add(new Users(2,"yanli",28,Users.WORK_TYPE_TWO,null));
        usersList.add(new Users(1,"changyang",30,Users.WORK_TYPE_ONE,null));
        usersList.add(new Users(1,"jiaxue",10,Users.WORK_TYPE_THREE,null));

        //类型一人员
        System.err.println("类型一："+new DataFilterByOne().actionData(usersList));
        //类型二人员
        System.err.println("类型二："+new DataFilterByTwo().actionData(usersList));
        //类型三人员
        System.err.println("类型三："+new DataFilterByThree().actionData(usersList));
    }
}
